﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Chatters.aspx.cs" 
    Inherits="WebChat.User.Chatters" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView runat="server" ID="GridViewChatters" 
            AutoGenerateColumns="false" >
        <Columns>
            <asp:TemplateField HeaderText="Username" SortExpression="ChatterId">
                <ItemTemplate>
                    <asp:HyperLink runat="server" 
                            Text='<%# EvalUserName() %>' 
                            NavigateUrl='<%# "Chatter.aspx?chatterId=" + Eval("ChatterId") %>' />
                </ItemTemplate>                
            </asp:TemplateField>
            <asp:TemplateField HeaderText="First Name" SortExpression="FirstName">
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# SafeEval("FirstName") %>' />
                </ItemTemplate>                
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Last Name" SortExpression="LastName">
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# SafeEval("LastName") %>' />
                </ItemTemplate>                
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Status"  >
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# EvalOnlineStatus() %>' CssClass='<%# EvalOnlineStatus() %>' />
                </ItemTemplate>                
            </asp:TemplateField>
            <%--<asp:TemplateField HeaderText="Roles" >
                <ItemTemplate>
                    <asp:Literal runat="server" Text='<%# EvalRoles() %>' />
                </ItemTemplate>                
            </asp:TemplateField>          --%>          
        </Columns>
    </asp:GridView>
</asp:Content>
